<div class="container">
  <div class="row">
  	<div class="col-md-6">
  		<div class="widget">
			<div class="widget-header">
				<i class="icon-user"></i>
				<h3>申请充值</h3>
			</div> <!-- /widget-header -->
			<div class="widget-content">
				<?php echo $this->BForm->create('Charge'); ?>
				<?php echo $this->BForm->input('account_type',array('label'=>'账户类型:','type'=>'select','options'=>$account_type_arr,'style'=>'width:200px;','after'=>'选择账户类型')); ?>
				<?php echo $this->BForm->input('mark',array('label'=>'备注:','type'=>'textarea','style'=>'width:200px;','after'=>'需要给管理员操作的凭证,比如支付记录')); ?>
				<?php echo $this->BForm->input('amount',array('label'=>'数量','type'=>'number','style'=>'width:200px;','default'=>1)) ?>
				<?php echo $this->BForm->submit('提交'); ?>
				<?php echo $this->Form->end(); ?>
			</div> <!-- /widget-content -->
		</div> <!-- /widget -->	
    </div> <!-- /span6 -->
    <div class="col-md-6">
    	<div class="widget">
			<div class="widget-header">
				<i class="icon-list"></i>
				<h3>充值记录</h3>
			</div> <!-- /widget-header -->
			<div class="widget-content">
		    	<table class="table">
		    		<tr>
		    			<th>ID</th>
		    			<th>类型</th>
		    			<th>数量</th>
		    			<th>状态</th>
		    			<th>备注</th>
		    			<th>错误备注</th>
		    			<th>时间</th>
		    		</tr>
		    		<?php foreach ((array)$data as $key => $one): ?>
		    			<tr>
		    				<td><?php echo $one['Charge']['id']; ?></td>
		    				<td><?php echo $one['Charge']['account_type']; ?></td>
		    				<td><?php echo $one['Charge']['amount']; ?></td>
		    				<td><?php echo $active_arr[$one['Charge']['active']] ?></td>
		    				<td><?php echo $one['Charge']['mark']; ?></td>
		    				<td><?php echo $one['Charge']['error_mark']?$one['Charge']['error_mark']:'-'; ?></td>
		    				<td><?php echo date('Y-m-d H:i:s',$one['Charge']['created']); ?></td>
		    			</tr>
		    		<?php endforeach ?>
		    	</table>
		    	<?php echo $this->element('pages'); ?>
			</div>
		</div>
    </div>
  </div> <!-- /row -->
</div> <!-- /container -->
